package com.tbit.uqbike.client.service.impl;

import com.tbit.common.entity.RidePayLog;
import com.tbit.uqbike.client.dao.core.RidePayLogDao;
import com.tbit.uqbike.client.service.RidePayLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: chen
 * @Description:
 * @Date: 创建于 14:00 2022/11/8
 */
@Service
public class RidePayLogServiceImpl implements RidePayLogService {

    @Autowired
    private RidePayLogDao ridePayLogDao;

    @Override
    public void insert(RidePayLog ridePayLog) {
    /*RidePayLog ridePayLogDB  = getByPayOrderNO(ridePayLog.getPayOrderNO());
    if(ridePayLogDB!=null){
      ridePayLogDao.edit(ridePayLog);
    }else{
      ridePayLogDao.insert(ridePayLog);
    }*/
        ridePayLogDao.insert(ridePayLog);
    }

    @Override
    public RidePayLog getByPayOrderNO(String payOrderNO) {
        return ridePayLogDao.getByPayOrderNO(payOrderNO);
    }

    @Override
    public List<RidePayLog> getByRideOrderNO(String rideOrderNO) {
        return ridePayLogDao.getByRideOrderNO(rideOrderNO);
    }


    @Override
    public void del(String rideOrderNO) {
        ridePayLogDao.del(rideOrderNO);
    }
}
